package com.tang.exception_;

public class NumberFormatException_ {
    //编写一个main方法
    public static void main(String[] args) {
        String name = "字符串";
        //将 String 转成 int
        int num = Integer.parseInt(name);//抛出NumberFormatException
        System.out.println(num);//1234
    }
}
